package tr.edu.yildiz.ce.dap.apm.commands;

import tr.edu.yildiz.ce.dap.apm.commands.basic.BasicReply;
import tr.edu.yildiz.ce.dap.appagent.command.deployment.base.CommandConstants;
import tr.edu.yildiz.ce.dap.appagent.model.DapMessage;

public class RetrieveCommandReply extends BasicReply{

	@Override
	public DapMessage reply(DapMessage input) {
		DapMessage dapMessage = new DapMessage();
		dapMessage.setCommand(CommandConstants.RETRIEVE);
		dapMessage.setAppName(input.getAppName());
		dapMessage.setAppVersion(input.getAppVersion());
		dapMessage.setComponentList(appService.getDetail(input.getAppName(), input.getAppVersion()));
		return dapMessage;
	}

}
